{// 引入标签库 }
<tagLib name="html" />
<include file="Public:header" />
<include file="Public:new" />
<load href='__TMPL__Common/js/jquery.bgiframe.js' />
<load href='__TMPL__Common/js/jquery.weebox.js' />
<load href='__TMPL__Common/js/user.js' />
<load href='__TMPL__Common/js/deal.js' />
<load href='__TMPL__Common/style/weebox.css' />
<script type="text/javascript" src="__TMPL__Common/js/calendar/calendar.php?lang=zh-cn" ></script>
<load href='__TMPL__Common/js/calendar/calendar.css' />
<load href='__TMPL__Common/js/calendar/calendar.js' />
<php>
function get_coins($id,$user_id){
    return "<a href=\"javascript:detail(".$id.",".$user_id.",0)\">未回收明细</a>";
}
function get_coins_log($id,$user_id){
    return "<a href=\"javascript:detail(".$id.",".$user_id.",1)\">已回收明细</a>";
}
function addLog($id,$user_id){
    return "<a href=\"javascript:addLog(".$id.",".$user_id.",1)\">回收</a>";
    return "<a>回收</a>";
}
</php>
<script type="text/javascript">
    function detail(id,user_id,check_type)
    {
        location.href = ROOT+"?"+VAR_MODULE+"="+MODULE_NAME+"&"+VAR_ACTION+"=detail&id="+id+"&user_id="+user_id+"&check_type="+check_type;
    }

    function addLog(id,user_id,check_type)
    {
        var url = ROOT + "?" + VAR_MODULE + "="+MODULE_NAME+"&" + VAR_ACTION + "=addLog&id="+id+"&user_id="+user_id+"&check_type="+check_type+"&game_id={$_REQUEST['game_id']}&begin_time={$_REQUEST['create_time_1']}&end_time={$_REQUEST['create_time_2']}";
        $.ajax({
            url: url,
            data: "ajax=1",
            dataType: "json",
            success: function(msg) {
                if (msg.status == 0) {
                    alert(msg.info);
                }
            },
            error: function() {
                $.weeboxs.open(url, {
                    contentType: 'ajax',
                    showButton: false,
                    title: '游戏币回收',
                    width: 600,
                    height: 260
                });
            }
        });
    }
</script>
<div class="main">
    <div class="main_title_list"><div class="list-line-ico"></div>游戏异常数据分析</div>
    <div class="search_row">
        <form name="search" action="__APP__" method="get" class="clearfix">
            <div>推广会员名称:<input type="text" class="textbox" name="nick_name" value="{:trim($_REQUEST['nick_name'])}" style="width:100px;" /></div>
            <div>上线二级单位:<input type="text" class="textbox" name="name" value="{:trim($_REQUEST['name'])}" style="width:100px;" /></div>
            <div>上线一级单位:<input type="text" class="textbox" name="p_name" value="{:trim($_REQUEST['p_name'])}" style="width:100px;" /></div>
            <div>上级会员ID：<input type="text" style="width:60px;" class="textbox" name="bm_pid" value="{:trim($_REQUEST['bm_pid'])}" /></div>
            <div>游戏类型：<select name="game_id">
            <option value="0">所有</option>
            <foreach name="games" item="item">
                <option value="{$item.id}" <if condition="$_REQUEST['game_id'] eq $item['id']">selected="selected"</if>>{$item.name}</option>
            </foreach>
            </select></div>
            <div>创建时间：
                <span><input type="text" class="textbox" name="create_time_1" id="create_time_1" value="{$_REQUEST['create_time_1']}" onfocus="this.blur(); return showCalendar('create_time_1', '%Y-%m-%d', false, false, 'btn_create_time_1');" /><input type="button" class="button" id="btn_create_time_1" value="{%SELECT_TIME}" onclick="return showCalendar('create_time_1', '%Y-%m-%d', false, false, 'btn_create_time_1');" /></span>
                - <span><input type="text" class="textbox" name="create_time_2" id="create_time_2" value="{$_REQUEST['create_time_2']}" onfocus="this.blur(); return showCalendar('create_time_2', '%Y-%m-%d', false, false, 'btn_create_time_2');" /><input type="button" class="button" id="btn_create_time_2" value="{%SELECT_TIME}" onclick="return showCalendar('create_time_2', '%Y-%m-%d', false, false, 'btn_create_time_2');" /></span>
                <input type="hidden" value="BmPromoterErrorGame" name="m" />
                <input type="hidden" value="index" name="a" />
                <input type="submit" class="button" value="{%SEARCH}" />
            </div>
        </form>
    </div>
<html:list
    id="dataTable"
    style="dataTable"
    name="user"
    action="true"
    datasource="list"
    show="nick_name:推广会员名称|150px
    ,name:上线二级单位|150px
    ,bm_pid:上级会员ID|90px
    ,p_name:上线一级单位|150px
    ,sum_bet:下注总额|100px
    ,user_gain:推广会员收支|100px
    ,platform_gain:平台收入|100px
    ,promoter_gain:一级单位流水收入|100px
    ,gain:二级单位收支|100px"
    actionlist="id|get_coins=$user['user_id'],id|get_coins_log=$user['user_id'],id|addLog=$user['user_id']" />
<div class="page">{$page}</div>
</div>
<include file="Public:footer" />